﻿<!DOCTYPE html>
<html>
<head>
    <title>javascript事件和事件处理</title>
    <meta charset="utf-8" />
    <script src="js/JavaScript.js"></script>
    <link href="style/gallery.css" rel="stylesheet" />
    <style>
        html, body { height: 100%; }
        .line { width: 1000px; text-align: center; margin: 50px auto; }
        #gallery { width: 1000px; height: 900px; margin: 20px auto; background: #ccc; }
    </style>
</head>
<body>
    <div id="div" style="width: 800px; height: 200px; border: 1px solid #ccc; margin: 20px auto;">
    </div>

    <div id="box"></div>
    <script>
        var box = document.getElementById("div");

        function a() {
            alert(1);
        }

        box.attachEvent("onclick", a, false);

        box.attachEvent("onclick", a, false);

    </script>

    <div style="position: absolute; display: none; left: 100px; top: 100px; width: 250px; height: 300px; border: 1px solid #000; background: #fff;">
        <div style="background: #ccc; border-bottom: 1px solid #000; padding: 3px;" onmousedown="drag(this.parentNode,event);">Drag me</div>
        <p>这里显示的事呢or那个</p>
    </div>



    <p class="line">--------------------------------------华丽的分割线------------------------------------------</p>

    <div id="gallery" class="gallery">
        <div class="galleryBox">
            <div class="galleryInner">
                <a href="#">
                    <img alt="" title="" src="#" />
                </a>
            </div>
        </div>
        <div id="galleryNav" class="galleryNav">
            <div class="gbtn prev end"><</div>
            <div class="gbtn next">></div>
            <div class="gnavBox">
                <ul>
                    <li>
                        <img src="img/gallery/1.gif" />
                    </li>
                    <li>
                        <img src="img/gallery/2.gif" />
                    </li>
                    <li>
                        <img src="img/gallery/2.gif" />
                    </li>
                    <li>
                        <img src="img/gallery/3.gif" />
                    </li>
                    <li>
                        <img src="img/gallery/4.gif" />
                    </li>
                    <li>
                        <img src="img/gallery/5.gif" />
                    </li>
                    <li>
                        <img src="img/gallery/3.gif" />
                    </li>
                    <li>
                        <img src="img/gallery/4.gif" />
                    </li>
                    <li>
                        <img src="img/gallery/5.gif" />
                    </li>
                </ul>
            </div>
        </div>
    </div>
</body>
</html>
